<!-- xml version="1.0" encoding="utf-8" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<title>De Bello Gallico</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link href="../flashcard.css" rel="stylesheet" type="text/css">
</head>


<script type="text/javascript">
var sentences = [
  [ ["Erant", "omnino", "itinera", "duo,", "quibus", "itineribus", "domo", "exire", "possent:"],
    ["There-were", "in-all", "routes", "two,", "by-which", "routes", "from-home", "out-to-go", "they-might-be-able:"] ],
  [ ["unum", "per", "Sequanos,", "angustum", "et", "difficile,"],
    ["one", "through", "Sequani,", "narrow", "and", "difficult,"] ],
  [ ["inter", "montem", "Iuram", "et", "flumen", "Rhodanum,", "vix", "qua", "singuli", "carri", "ducerentur;"],
    ["between", "mountain", "Jura", "and", "river", "Rhone,", "hardly", "where", "one-by-one", "carts", "could-be-drawn;"] ],
  [ ["mons", "autem", "altissimus", "impendebat,", "ut", "facile", "perpauci", "prohibere", "possent:"],
    ["mountain", "moreover", "very-high", "was-over-hanging,", "so-that", "easily", "very-few", "hold-in-check", "could:"] ],
  [ ["alteram", "per", "provinciam", "nostram,", "multo", "facilius", "atque", "expeditius,"],
    ["[the]-other", "through", "province", "our,", "much", "more-easy", "and-also", "more-unimpeded,"] ],
  [ ["propterea", "quod", "inter", "fines", "Helvetiorum", "et", "Allobrogum,", "qui", "nuper", "pacati", "erant,"],
    ["on-account-of-this", "that", "between", "territories", "of-Helverii", "and", "of-Allobroges,", "who", "lately", "having-been-reduced-to-peace", "were,"] ],
  [ ["Rhodanus", "fluit", "isque", "nonnullis", "locis", "vado", "transitur."],
    ["Rhone", "flows", "that-also", "in-not-no", "places", "by-ford", "over-is-passed."] ],
  [ ["Extremum", "oppidum", "Allobrogum", "est", "proximumque", "Helvetiorum", "finibus", "Genava."],
    ["Very-last", "walled-town", "of-Allobroges", "is", "nearest-also", "of-Helvetii", "to-[the]-territories", "Geneva."] ],
  [ ["Ex", "eo", "oppido", "pons", "ad", "Helvetios", "pertinet."],
    ["Out-of", "that", "walled-town", "bridge", "to", "Helvetii", "extends."] ],
  [ ["Allobrogibus", "sese", "vel", "persuasuros,", "quod", "nondum", "bono", "animo", "in", "populum", "Romanum", "viderentur,"],
    ["On-Allobroges", "themselves", "either", "about-to-prevail_(to-be),", "because", "not-yet", "in-[a]-good", "disposition", "toward", "people", "Roman", "they-seemed,"] ],
  [ ["existimabant", "vel", "vi", "coacturos,", "ut", "per", "suos", "fines", "eos", "ire", "paterentur."],
    ["they-thought", "or", "by-force", "about-to-compel_(to-be),", "that", "through", "their-own", "territories", "those", "to-go", "they-would-allow."] ],
  [ ["Omnibus", "rebus", "ad", "profectionem", "comparatis", "diem", "dicunt,", "qua", "die", "ad", "ripam", "Rhodani", "omnes", "conveniant."],
    ["All", "things", "for", "departure", "having-been-prepared", "day", "they-name,", "on-which", "day", "near", "bank", "of-Rhone", "all", "are-to-assemble."] ],
  [ ["Is", "dies", "erat", "a.", "d.", "v.", "Kal.", "Apr.", "L.", "Pisone", "A.", "Gabinio", "consulibus."],
    ["That", "day", "was", "ante - before", "diem - day", "fifth", "Kalends", "April", "Lucius", "Piso", "Aulus", "Gabinius", "[being]_consuls."] ]
];

var i = 0;
var j = 0;

var shown = 0;

function updateVoc() {
	
	var sentence = "";
	
	for(n = 0; n < sentences[i][0].length; n++) {
		if (n == j) {
			sentence += ' <span class="curword">' + sentences[i][0][n] + "</span>";
		} else {
			sentence += " " + sentences[i][0][n];
		}
	}
	
	document.getElementById('v3').innerHTML = sentence;
	
	if (shown == 0) {
		document.getElementById('v1').innerHTML = "";
	} else {
		document.getElementById('v1').innerHTML = sentences[i][1][j];
	}
}

function next() {
	shown++;
	if (shown > 1) {
		shown = 0;
		j++;
		if (j >= sentences[i][0].length) {
			j = 0;
			i++;
			if (i >= sentences.length) {
				i = 0;
				alert('All done!');
			}
		}
	}
	updateVoc();
}

function prev() {
	shown--;
	if (shown < 0) {
		shown = 1;
		j--;
		
		if (j < 0) {
			i--;
			if (i < 0) {
				i = sentences.length - 1;
				alert('All done!');
			}
			j = sentences[i][0].length - 1;
		}
	}
	
	updateVoc();
}

</script>

<body onload="updateVoc()">
<h1 style="text-align:center; color: #60B0C0;">Liber I - Caput VI</h1>

<div class="center">
<div id="v3" class="v3"></div>
<div id="v2" class="v2">&nbsp;</div>
<div id="v1" class="v1"></div>


<a href="#" class="button" id="btnprev" onclick="prev()" accesskey="p">&lt;&lt;</a>
<a href="#" class="button" id="btnnext" onclick="next()" accesskey="n">&gt;&gt;</a>


</div>
</body>
</html>
